<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:37:49
 * @Description: 团购用户
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-19 18:23:05
 * @FilePath: /归档/expand/2021_10_19_103749_create_tuan_user.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTuanUser extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tuan_users', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->foreignId('tuan_id')->comment('团购ID');
            $table->foreignId('user_id')->comment('用户ID');
            $table->tinyInteger('status')->comment('状态 1正常 0取消');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('tuan_users');
    }
}
